import ajax from '@/api/apiConfig.js'

/* 巡检记录任务列表
 */
export const getInspectTaskListForClient = (data) => {
  return ajax.get('examine/getExamineTaskList', data)
}

/* 巡检记录任务列表统计
 */
export const getInspectTaskStatistic = (data) => {
  return ajax.get('examine/getExamineTaskListCount', data)
}

/* 巡检记录任务详情
 */
export const getInspectTaskPointListForClient = (data) => {
  return ajax.get('examine/getExamineTaskDetail', data)
}

/* 巡检任务点位内容
 */
export const getInspectTaskPointContent = (data) => {
  return ajax.get('examine/getTaskPointResult', data)
}

/* 巡检记录统计
 */
export const getInspectTaskCount = (data) => {
  return ajax.get('inspectionNew/getInspectTaskCount', data)
}

/* 点位类别列表
 */
export const getInspectPointTypeList = (data) => {
  return ajax.get('examine/pointType/getLists', data)
}

/* 删除点位类别
 */
export const delInspectPointType = (data) => {
  return ajax.get('examine/pointType/delOnePointType', data)
}

/* 点位类别详情
 */
export const getPointTypeInfo = (data) => {
  return ajax.get('examine/pointType/getOneInfo', data)
}

/* 保存/编辑巡检点位类型
 */
export const addInspectPointType = (data) => {
  return ajax.post('examine/pointType/addPointType', data)
}

/* 更新点位类别
 */
export const updatePointType = (data) => {
  return ajax.post('examine/pointType/updatePointType', data)
}

/* 巡检点位统计
 */
export const getInspectPointNewCountOrg = (data) => {
  return ajax.get('inspectPointNew/getInspectPointNewCountOrg', data)
}

/* 巡检点位列表
 */
export const getInspectPointNewList = (data) => {
  return ajax.get('examinePoint/getExaminePointList', data)
}

/* 新增/编辑点位
 */
export const addOrUpdateInspectPoint = (data) => {
  return ajax.post('examinePoint/addExaminePoint', data)
}

/* 编辑点位打印状态
 */
export const updateInspectPointPrintStatus = (data) => {
  return ajax.post('examinePoint/updateExaminePointVPStatus', data)
}

/* 删除点位类别
 */
export const delInspectPointNewById = (data) => {
  return ajax.post('examinePoint/delExaminePoint', data)
}

/* 判断点位类别是否使用，获取使用的点位id
 */
export const judgePointUsed = (data) => {
  return ajax.get('examine/pointType/isUsePointIds', data)
}

/* 各单位巡检路线统计
 */
export const getTeamPointAreaList = (data) => {
  return ajax.get('inspectionNew/getTeamPointAreaList', data)
}

/* 单位巡检路线列表
 */
export const getInspectRouteList = (data) => {
  return ajax.get('inspectionNew/getInspectRouteList', data)
}

/* 删除巡检路线记录
 */
export const delInspectRoute = (data) => {
  return ajax.post('inspectionNew/delInspectRoute', data)
}

/* 更新路线记录
 */
export const addInspectRoute = (data) => {
  return ajax.post('inspectionNew/addInspectRoute', data)
}

/* 获取巡检计划列表
 */
export const getInspectPlanList = (data) => {
  return ajax.get('examinePlan/getExaminePlanList', data)
}
/* 删除巡检计划记录
 */
export const delInspectPlan = (data) => {
  return ajax.post('examinePlan/delExaminePlan', data)
}
/* 停用、启用巡检计划
 */
export const isEnable = (data) => {
  return ajax.post('examinePlan/isEnable', data)
}
/* 新增巡检计划
 */
export const addInspectPlan = (data) => {
  return ajax.post('examinePlan/addExaminePlan', data)
}
/* 更新巡检计划
 */
export const updateInspectPlan = (data) => {
  return ajax.post('examinePlan/updateExaminePlan', data)
}
/* 获取点位标签列表
 */
export const getPointLabelList = (data) => {
  return ajax.get('common/getLableList', data)
}
/* 获取计划点位列表
 */
export const getPointListOfPlan = (data) => {
  return ajax.get('examinePoint/getPointsList', data)
}
/* 每日巡检点位完成率统计
 */
export const getTimeCycleStatisticsForClient = (data) => {
  return ajax.get('inspectionNew/getTimeCycleStatisticsForClient', data)
}
/* 巡检员巡检完成情况
 */
export const getPersonInspectRank = (data) => {
  return ajax.get('examine/getExamineTaskPeopleCount', data)
}
/* 单位巡检完成度排名
 */
export const getOrgInspectCompleteness = (data) => {
  return ajax.get('examine/getExamineTaskOrgOrder', data)
}

/* 获取单条巡检记录的统计
 */
export const getInspectTaskPointCountForClient = (data) => {
  return ajax.get('inspectionNew/getInspectTaskPointCountForClient', data)
}
